package com.dxf.chepter04

/**
 *
 *
 *
 *
 *
 */
object T43_类与对象应用 {
  def main(args: Array[String]): Unit = {

    val dog = new Dog2
    dog.name="xx"
    dog.age=1
    dog.weight=12

    println(dog.say())

  }

}


class Dog2 {
  var name: String = ""
  var age = 0
  var weight = 0.0

  def say() = {
    "name=" +this.name+" age="+age+" weight="+weight
  }

}
